package com.fandou.airobot.ui.recording;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.fandou.airobot.domain.request.RecordingPeriodRequest;
import com.fandou.airobot.domain.request.Request;

/**
 * Create by yangzj at 2020/6/19
 */
public class RecordingPeriodViewModel extends ViewModel implements Request.IRecordingPeriodRequest {
    public MutableLiveData<Integer> time = new MutableLiveData<>();

    private Request.IRecordingPeriodRequest recordingPeriodRequest = new RecordingPeriodRequest();

    @Override
    public LiveData<Integer> getRecordingPeriodLiveData() {
        return recordingPeriodRequest.getRecordingPeriodLiveData();
    }

    @Override
    public void requestRecordingPeriod() {
        recordingPeriodRequest.requestRecordingPeriod();
    }

    @Override
    public void saveRecordingPeriod(int time) {
        recordingPeriodRequest.saveRecordingPeriod(time);
    }
}
